package com.isunland.managesystem.ui;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import com.isunland.managesystem.entity.LeaseRealHandleDeviceInfo;

/**
 * 开发公司: 北京信普达系统工程有限公司
 * 开发人员: wangyanan
 */

public class LeaseActualDetailActivity extends SingleFragmentActivity {

  private LeaseRealHandleDeviceInfo item;

  public static void newInstance(android.support.v4.app.Fragment fragment, Activity context,
      LeaseRealHandleDeviceInfo item, int requestCode) {
    if (fragment == null || context == null) return;
    Intent i = new Intent(context, LeaseActualDetailActivity.class);
    i.putExtra(LeaseActualDetailFragment.EXTRA_ITEM, item);
    fragment.startActivityForResult(i, requestCode);
  }

  @Override protected void onCreate(Bundle arg0) {
    item = (LeaseRealHandleDeviceInfo) getIntent().getSerializableExtra(
        LeaseActualDetailFragment.EXTRA_ITEM);

    super.onCreate(arg0);
  }

  @Override protected Fragment createFragment() {
    return LeaseActualDetailFragment.newInstance(item);
  }
}
